 <include file="Public:head" /> 
 <link rel="stylesheet" type="text/css" href="{lanrain::RES}/css/cymain.css" />
 <link rel="stylesheet" href="{lanrain::STATICS}/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{lanrain::STATICS}/kindeditor/plugins/code/prettify.css" />
<script src="{lanrain::STATICS}/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="{lanrain::STATICS}/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="{lanrain::STATICS}/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<script src="{lanrain::RES}/js/date/WdatePicker.js"></script>
<script type="text/javascript" src="{lanrain::RES}/js/formCheck/formcheck.js"> </script>
<script>

var editor;
KindEditor.ready(function(K) {
editor = K.create('#content', {
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : false,
items : [
'source','undo','clearhtml','hr',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image','link', 'unlink','baidumap','lineheight','table','anchor','preview','print','template','code','cut']
});

});

function inputtypeChange(){
	if($('#inputtype').attr('value')=='select'){
		$('#troptions').css("display","");
	}else{
		$('#troptions').css("display","none");
	}
}
function regexChange(){
	$('#regex').attr('value',$('#regexSelect').attr('value'))
}
</script>

  <div class="content" style="width:920px; background:none; margin-left:275px; border:none; margin-bottom:30px;" > 
   <div class="cLineB"> 
    <h4>“{lanrain:$thisForm['name']}”输入项设置</h4> 
    <a href="{lanrain::U('Selfform/inputs',array('token'=>$token,'id'=>$thisForm['id']))}" class="right  btnGreen" style="margin-top:-27px">返回</a> 
   </div> 
   

   <form class="form" method="post" id="form" action=""> 
<if condition="$isUpdate eq 1">
<input type="hidden" name="id" value="{lanrain:$set.id}" />
</if>
<input type="hidden" name="formid" value="{lanrain:$thisForm['id']}" />
    <div class="msgWrap bgfc"> 
     <table class="userinfoArea" style=" margin:0;" border="0" cellspacing="0" cellpadding="0" width="100%"> 
      <tbody> 
       <tr> 
        <th><span class="red">*</span>显示名称：</th>
        <td><input type="text" id="displayname" name="displayname" value="{lanrain:$set.displayname}" class="px require" style="width:400px;" /></td> 
       </tr> 
        <tr> 
        <th><span class="red">*</span>字段名称：</th>
        <td><input type="text" id="fieldname" name="fieldname" value="{lanrain:$set.fieldname}" class="px require" style="width:400px;" /></td> 
       </tr> 
       <tr> 
        <th><span class="red">*</span>输入类型：</th>
        <td><select name="inputtype" id="inputtype" onchange="inputtypeChange()">{lanrain:$inputTypeOptions}</select></td> 
       </tr>
       <tr id="troptions"<if condition="$set['inputtype'] neq select"> style="display:none"</if>> 
        <th><span class="red"></span>选项：</th>
        <td><input type="text" id="options" name="options" value="{lanrain:$set.options}" class="px require" style="width:400px;" /> 下拉列表的各个选项，多个选项用“|”隔开</td> 
       </tr>
       <tr> 
        <th><span class="red">*</span>是否必填：</th>
        <td><select name="require" id="require">{lanrain:$requireOptions}</select></td> 
       </tr> 
       <tr> 
        <th><span class="red">*</span>输入限制：</th>
        <td><select name="regexSelect" id="regexSelect" onchange="regexChange()">{lanrain:$regexOptions}</select> <input type="text" name="regex" id="regex" value="{lanrain:$set.regex}" class="px" style="width:400px;" /> 可以自己编写正则表达式</td> 
       </tr>
       </tr>
        <tr> 
        <th><span class="red">*</span>排序：</th>
        <td><input type="text" name="taxis" id="taxis" value="{lanrain:$set.taxis}" class="px" style="width:400px;" /></td> 
       </tr>
       <tr> 
        <th><span class="red"></span>错误提示：</th> 
        <td><input type="text" name="errortip" id="errortip" value="{lanrain:$set.errortip}" class="px" style="width:400px;" /> 输入错误时的提示内容</td> 
       </tr>

       <th>&nbsp;</th>
       <td>
       <button type="submit" name="button" class="btnGreen">保存</button> &nbsp; <a href="{lanrain::U('Selfform/inputs',array('token'=>$token,'id'=>$thisForm['id']))}" class="btnGray vm">取消</a></td> 
       </tr> 
      </tbody> 
     </table> 
     </div>
    
   </form> 
  </div> 
<script language="javascript">
$(function(){

	$("#form").valid([
	{ name:"displayname",simple:"显示名称",require:true},
	{ name:"fieldname",type:"eng",simple:"字段名称",require:true},
	{ name:"inputtype",simple:"输入类型",require:true}	
	],true,true);

})
</script>
  <include file="Public:footer" />